Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In string search, replace unsafe_wrap with codeunits #48275

Merged
merged 1 commit into from
Jan 14, 2023

Conversation

jakobnissen
Copy link
Contributor

Currently, findfirst(::String, ::String) will eventually end up calling unsafe_wrap on both arguments, in order to use Julia's generic vector search functions. This causes unnecessary allocations.

This PR replaces use of unsafe_wrap with codeunits, removing the allocation.

See also: #45393

Currently, `findfirst(::String, ::String)` will eventually end up calling
`unsafe_wrap` on both arguments, in order to use Julia's generic vector search
functions. This causes unnecessary allocations.

This PR replaces use of `unsafe_wrap` with `codeunits`, removing the allocation.

See also: JuliaLang#45393
@stevengj
Copy link
Member

CI errors seem unrelated. (On x86_64-win64-mingw32 it is gfortran: command not found, and on x86_64-apple-darwin it is a ProcessExitedException in testset Sockets.)

@KristofferC KristofferC merged commit 0371bf4 into JuliaLang:master Jan 14, 2023
@jakobnissen jakobnissen deleted the searchcu branch January 15, 2023 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants